#include<stdio.h>
int inverse(int n);
int main()
{
	int n,sum = 0;
	scanf("%d",&n);
	int m = inverse(n);
	sum = m + n;
	printf("%d\n",sum);
	return 0;
}
int inverse(int n)
{
    int c = 0;
    int a = 0;
    while(n!=0)
    {
	a = n % 10;
	c = (c + a) * 10;
	n = n / 10;
    }
	return c/10; 	
}
